//
//  TeamLeader.m
//  Doctor1.0
//
//  Created by mk on 15/7/13.
//  Copyright (c) 2015年 cocoa-mk. All rights reserved.
//

#import "TeamLeader.h"

@implementation TeamLeaderInfo

-(id)init
{
    if (self = [super init])
    {
        self.urlPath = @"";
        self.strDataKey = requestDataKey;
    }
    return self;
}

-(void)parseData:(id)dataObj
{
    [super parseData:dataObj];
    
    if ([dataObj isKindOfClass:[NSDictionary class]])
    {
      
        if([dataObj[@"honour"] isKindOfClass:[NSArray class]])
        {
          self.leader_honour = [NSMutableArray arrayWithArray:dataObj[@"honour"]];//荣誉
        }else
        {
            self.leader_honour = [[NSMutableArray alloc]initWithCapacity:0];
        }
        
        self.leader_id = NullObjToString(dataObj[@"id"]);
        self.leader_name = NullObjToString(dataObj[@"name"]);
        self.leader_hpId = NullObjToString(dataObj[@"hpId"]);
        self.leader_hpName = NullObjToString(dataObj[@"hpName"]);
        self.leader_mTitle = NullObjToString(dataObj[@"mTitle"]);
        self.leader_aTitle = NullObjToString(dataObj[@"aTitle"]);
        self.leader_imageUrl = NullObjToString(dataObj[@"imageUrl"]);
        self.leader_desc = NullObjToString(dataObj[@"desc"]);
        self.leader_hpDeptId = NullObjToString(dataObj[@"hpDeptId"]);
        self.leader_hpDeptName = NullObjToString(dataObj[@"hpDeptName"]);
        self.leader_hFaculty = NullObjToString(dataObj[@"hFaculty"]);
        
    }
}


@end


@implementation TeamLeaderList

-(id)init
{
    if (self = [super init])
    {
        self.urlPath = @"";
        self.strDataKey = requestDataKey;
    }
    return self;
}

-(void)parseData:(id)dataObj
{
    [super parseData:dataObj];
    
    if ([dataObj isKindOfClass:[NSArray class]])
    {
        for (int i = 0; i < [dataObj count]; i++) {
            NSDictionary *dicRec = [dataObj objectAtIndex:i];
            TeamLeaderInfo *recData = [[TeamLeaderInfo alloc] init];
            [recData parseData:dicRec];
            [self.dataArray addObject:recData];
        }
    }
}

@end



